﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Quotation
{
    public sealed class StockQuotLevel:StrictFlagBase<string,StockQuotLevel>
    {
        private StockQuotLevel(string value) : base(value) { }

        public static readonly StockQuotLevel Level1 = new StockQuotLevel("L1");

        public static readonly StockQuotLevel Level2 = new StockQuotLevel("L2");

        /// <summary>
        /// 隐式类型转换
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static implicit operator StockQuotLevel(string value)
        {
            if (value == null)
                return default(StockQuotLevel);
            else
            {
                StockQuotLevel rtn;
                StockQuotLevel.TryConvert(value, out rtn);
                return rtn;
            }
        }
    }
}
